let header_v = new Vue({
    el:"header",
    data:{
        arr:[]
    },
    created:function () {
        //console.log("111")
        //请求所有分类信息
        axios.get("/category/select").then(function (response) {
            header_v.arr = response.data;
        })
    },
    methods:{
        login:function () {
            //得到当前登录对象
            axios.get("currentUser").then(function (response) {
                location.href = response.data==""?"/login.html":"/admin.html";
            })
        }
    }
})